package huanzhao.erp.mapper;

import huanzhao.erp.domain.entity.ClearRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClearRecordMapper extends BaseMapper<ClearRecord> {
    /**
     * 检查手机是否处在盘库中
     *
     * @param clearId 盘库id
     * @param phoneId 手机id
     * @return boolean
     * 2024/10/13 09:18:51
     */
    boolean isPhoneInClear(@Param("clearId") long clearId, @Param("phoneId") Long phoneId);

    /**
     * 确认盘点
     * 2024/10/13 09:24:21
     */
    void confirmClear(@Param("clearId") long clearId, @Param("phoneId") Long phoneId, @Param("found") boolean found);

    /**
     * 查询特定盘库记录中的手机
     *
     * @param found 手机是否已找到
     * @return List<Long> 返回手机id数组
     * 2024/10/13 09:52:53
     */
    List<Long> getClearPhones(@Param("clearId") long clearId, @Param("found") Boolean found);

    /**
     * 查询特定手机的盘库记录
     * @param phoneId 手机id
     * @return List<ClearRecord>
     * 2024/10/13 10:01:01
     */
    List<ClearRecord> selectByPhoneId(@Param("phoneId") Long phoneId);
}




